import { useState, useEffect } from 'react'
import './App.css'
import { fetchTodos } from './api'

function App() {
  const [todos, setTodos] = useState([]);
  const [loading, setLoading] = useState(true);
  useEffect(() => {
    // 请求数据
    // setLoading(true)
    //fetchTodos ？ 参数对象来组织
    fetchTodos({query: 'todo', tab: '全部'})
      .then((data) => {
        console.log(data);
      })
  }, [])
  return (
    <>

    </>
  )
}

export default App
